import type { AppRouteModule } from '@/router/types';
import { LAYOUT, getParentLayout } from '@/router/constant';

const vinno: AppRouteModule = {
  path: '/vinno',
  name: 'Vinno',
  component: LAYOUT,
  redirect: '/vinno/brand',
  meta: {
    icon: 'mingcute:wechat-fill',
    title: '小程序',
    orderNo: 4000,
  },
  children: [
    {
      path: 'settings',
      name: 'SettingsPage',
      component: getParentLayout('SettingsPage'),
      meta: {
        icon: 'icon-park:setting-two',
        title: '基础配置',
      },
      children: [
        {
          path: 'company',
          name: 'CompanySettingPage',
          component: () => import('/@/views/vinno/settings/company/SettingPage.vue'),
          meta: {
            icon: 'game-icons:ginkgo-leaf',
            title: '公司信息',
          },
        },
        {
          path: 'saler',
          name: 'SalerPage',
          component: () => import('/@/views/vinno/settings/saler/SalerPage.vue'),
          meta: {
            icon: 'fluent:people-16-regular',
            title: '销售人员',
          },
        },
      ],
    },
    {
      path: 'spaceinfo',
      name: 'SpaceInfoPage',
      component: () => import('/@/views/vinno/space/SpaceInfoPage.vue'),
      meta: {
        icon: 'carbon:home',
        title: '品牌空间',
      },
    },
    {
      path: 'products',
      name: 'ProductsPage',
      component: getParentLayout('ProductsPage'),
      meta: {
        icon: 'carbon:product',
        title: '产品矩阵',
      },
      children: [
        {
          path: 'carousel',
          name: 'ProductCarouselPage',
          component: () => import('/@/views/vinno/products/carousel/ProductCarouselPage.vue'),
          meta: {
            icon: 'mingcute:device-line',
            title: '轮播',
          },
        },
        {
          path: 'product',
          name: 'ProductPage',
          component: () => import('/@/views/vinno/products/product/ProductPage.vue'),
          meta: {
            icon: 'mingcute:wash-machine-line',
            title: '产品',
          },
        },
      ],
    },
    {
      path: 'suggest',
      name: 'SuggestPage',
      component: () => import('/@/views/vinno/suggest/SuggestPage.vue'),
      meta: {
        icon: 'arcticons:note',
        title: '在线反馈',
      },
    },
  ],
};

export default vinno;
